<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="/webwork" prefix="ww"%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
    <title>Order Status Administration</title>
  </head>
  <body onload="document.newOrderStatusForm.newOrderStatusName.focus();">
        
  <%@ include file="/admin-header.html" %>

  <h2>Order Status Administration</h2>

 	<form name="updateStatusForm" action="OrderStatusAdmin.action" method="post">
	<table border="1">
		<tr>
			<th>Order Status Name</th>
			<th>Step # in the order process</th>
                        <th>Valid</th>
		</tr>
		<ww:iterator value="allOrderStatuses">
		<tr>
			<td><ww:textfield size ="25" name="orderStatusNameMap[%{id}]" value="%{name}"/></td>
			<td><ww:textfield name="orderStatusStepMap[%{id}]" value="%{step}" size="24"/></td>
			<td><ww:textfield name="orderStatusValidMap[%{id}]" value="%{valid}" size="4"/></td>
		</tr>
		</ww:iterator>
	</table>
        <input type="submit" name="method:updateOrderStatus" value="Commit changes" />
        </form>
        
        <p/>
        
        <h3>Add New Order Status</h3>
        
        <form name="newOrderStatusForm" action="OrderStatusAdmin.action" method="post">

	<ww:if test="hasActionErrors()">
	<ul>
	<ww:iterator value="actionErrors">
		<li style="color: red;"><ww:property /></li>
	</ww:iterator>
	</ul>
        </ww:if>
        
        <table border="1">
		<tr>
			<th>Order Status Name</th>
			<th>Step # in the order process</th>
		</tr>
		<tr>   
			<td><ww:textfield size ="25" name="newOrderStatusName"/></td>
			<td><ww:textfield size ="35" name="newOrderStatusStep"/></td>
		</tr>
	</table>
        <input type="submit" name="method:newOrderStatus" value="Add new order status" />
        </form>
        <p/>
        <a href="LoadOrderStatus.action">Revert to Saved</a> - 
        <a href="LogOut.action">Logout</a>
    </body>
</html>